package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 3:08:52 PM by Hibernate Tools 3.2.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * TbRepresentante generated by hbm2java
 */
@Entity
@Table(name = "TB_REPRESENTANTE", schema = "CATALOGOS")
public class TbRepresentante implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String crepresentante;
	private String cusuario;
	private String drepresentante;
	private Date fhingreso;
	private Integer bstatus;
	private Integer bruc;
	private Integer bctacte;
	 	private Set<ImSolicitud> imSolicituds = new HashSet<ImSolicitud>(0);

	public TbRepresentante() {
		
	}
	public TbRepresentante(String crepresentante) {
		this.crepresentante = crepresentante;
	}

	public TbRepresentante(String crepresentante, String cusuario,
			String drepresentante, Date fhingreso, Integer bstatus) {
		this.crepresentante = crepresentante;
		this.cusuario = cusuario;
		this.drepresentante = drepresentante;
		this.fhingreso = fhingreso;
		this.bstatus = bstatus;
	}

	public TbRepresentante(String crepresentante, String cusuario,
			String drepresentante, Date fhingreso, Integer bstatus,
			 
			 
			Set<ImSolicitud> imSolicituds) {
		this.crepresentante = crepresentante;
		this.cusuario = cusuario;
		this.drepresentante = drepresentante;
		this.fhingreso = fhingreso;
		this.bstatus = bstatus;
		 
		 
		this.imSolicituds = imSolicituds;
	}

	@Id
	@Column(name = "C_REPRESENTANTE", unique = true, nullable = false, length = 2)
	public String getCrepresentante() {
		return this.crepresentante;
	}

	public void setCrepresentante(String crepresentante) {
		this.crepresentante = crepresentante;
	}

	@Column(name = "C_USUARIO", nullable = false, length = 30)
	public String getCusuario() {
		return this.cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

	@Column(name = "D_REPRESENTANTE", nullable = false, length = 50)
	public String getDrepresentante() {
		return this.drepresentante;
	}

	public void setDrepresentante(String drepresentante) {
		this.drepresentante = drepresentante;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_INGRESO", nullable = false, length = 7)
	public Date getFhingreso() {
		return this.fhingreso;
	}

	public void setFhingreso(Date fhingreso) {
		this.fhingreso = fhingreso;
	}

	@Column(name = "B_STATUS", nullable = false, precision = 1, scale = 0)
	public Integer getBstatus() {
		return this.bstatus;
	}

	public void setBstatus(Integer bstatus) {
		this.bstatus = bstatus;
	}
	
	@Column(name = "B_RUC", precision = 1, scale = 0)
	public Integer getBruc() {
		return this.bruc;
	}

	public void setBruc(Integer bruc) {
		this.bruc = bruc;
	}

	@Column(name = "B_CTACTE", precision = 1, scale = 0)
	public Integer getBctacte() {
		return this.bctacte;
	}

	public void setBctacte(Integer bctacte) {
		this.bctacte = bctacte;
	}

	 

	 
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbRepresentante")
	public Set<ImSolicitud> getImSolicituds() {
		return imSolicituds;
	}

	public void setImSolicituds(Set<ImSolicitud> imSolicituds) {
		this.imSolicituds = imSolicituds;
	}

}
